<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - /usr/include/c++/4.3/i486-linux-gnu/bits/c++locale.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.3/i486-linux-gnu/bits</a> - c++locale.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">7</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">100.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">7</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // Wrapper for underlying C-language localization -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
<span class="lineNum">       4 </span>                : // Free Software Foundation, Inc.
<span class="lineNum">       5 </span>                : //
<span class="lineNum">       6 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       7 </span>                : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       8 </span>                : // terms of the GNU General Public License as published by the
<span class="lineNum">       9 </span>                : // Free Software Foundation; either version 2, or (at your option)
<span class="lineNum">      10 </span>                : // any later version.
<span class="lineNum">      11 </span>                : 
<span class="lineNum">      12 </span>                : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      13 </span>                : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      14 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      15 </span>                : // GNU General Public License for more details.
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : // You should have received a copy of the GNU General Public License along
<span class="lineNum">      18 </span>                : // with this library; see the file COPYING.  If not, write to the Free
<span class="lineNum">      19 </span>                : // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
<span class="lineNum">      20 </span>                : // USA.
<span class="lineNum">      21 </span>                : 
<span class="lineNum">      22 </span>                : // As a special exception, you may use this file as part of a free software
<span class="lineNum">      23 </span>                : // library without restriction.  Specifically, if other files instantiate
<span class="lineNum">      24 </span>                : // templates or use macros or inline functions from this file, or you compile
<span class="lineNum">      25 </span>                : // this file and link it with other files to produce an executable, this
<span class="lineNum">      26 </span>                : // file does not by itself cause the resulting executable to be covered by
<span class="lineNum">      27 </span>                : // the GNU General Public License.  This exception does not however
<span class="lineNum">      28 </span>                : // invalidate any other reasons why the executable file might be covered by
<span class="lineNum">      29 </span>                : // the GNU General Public License.
<span class="lineNum">      30 </span>                : 
<span class="lineNum">      31 </span>                : /** @file c++locale.h
<span class="lineNum">      32 </span>                :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      33 </span>                :  *  You should not attempt to use it directly.
<span class="lineNum">      34 </span>                :  */
<span class="lineNum">      35 </span>                : 
<span class="lineNum">      36 </span>                : //
<span class="lineNum">      37 </span>                : // ISO C++ 14882: 22.8  Standard locale categories.
<span class="lineNum">      38 </span>                : //
<span class="lineNum">      39 </span>                : 
<span class="lineNum">      40 </span>                : // Written by Benjamin Kosnik &lt;bkoz@redhat.com&gt;
<span class="lineNum">      41 </span>                : 
<span class="lineNum">      42 </span>                : #ifndef _GLIBCXX_CXX_LOCALE_H
<span class="lineNum">      43 </span>                : #define _GLIBCXX_CXX_LOCALE_H 1
<span class="lineNum">      44 </span>                : 
<span class="lineNum">      45 </span>                : #pragma GCC system_header
<span class="lineNum">      46 </span>                : 
<span class="lineNum">      47 </span>                : #include &lt;clocale&gt;
<span class="lineNum">      48 </span>                : #include &lt;cstddef&gt;
<span class="lineNum">      49 </span>                : 
<span class="lineNum">      50 </span>                : #define _GLIBCXX_C_LOCALE_GNU 1
<span class="lineNum">      51 </span>                : 
<span class="lineNum">      52 </span>                : #define _GLIBCXX_NUM_CATEGORIES 6
<span class="lineNum">      53 </span>                : 
<span class="lineNum">      54 </span>                : #if __GLIBC__ &gt; 2 || (__GLIBC__ == 2 &amp;&amp; __GLIBC_MINOR__ &gt; 2)
<span class="lineNum">      55 </span>                : _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                :   extern &quot;C&quot; __typeof(uselocale) __uselocale;
<span class="lineNum">      58 </span>                : 
<span class="lineNum">      59 </span>                : _GLIBCXX_END_NAMESPACE
<span class="lineNum">      60 </span>                : #endif
<span class="lineNum">      61 </span>                : 
<span class="lineNum">      62 </span>                : _GLIBCXX_BEGIN_NAMESPACE(std)
<span class="lineNum">      63 </span>                : 
<span class="lineNum">      64 </span>                :   typedef __locale_t            __c_locale;
<span class="lineNum">      65 </span>                : 
<span class="lineNum">      66 </span>                :   // Convert numeric value of type double and long double to string and
<span class="lineNum">      67 </span>                :   // return length of string.  If vsnprintf is available use it, otherwise
<span class="lineNum">      68 </span>                :   // fall back to the unsafe vsprintf which, in general, can be dangerous
<span class="lineNum">      69 </span>                :   // and should be avoided.
<span class="lineNum">      70 </span>                :   inline int
<span class="lineNum">      71 </span>                :   __convert_from_v(const __c_locale&amp; __cloc __attribute__ ((__unused__)),
<span class="lineNum">      72 </span>                :                    char* __out,
<span class="lineNum">      73 </span>                :                    const int __size __attribute__ ((__unused__)),
<span class="lineNum">      74 </span><span class="lineCov">           4168 :                    const char* __fmt, ...)</span>
<span class="lineNum">      75 </span>                :   {
<span class="lineNum">      76 </span>                : #if __GLIBC__ &gt; 2 || (__GLIBC__ == 2 &amp;&amp; __GLIBC_MINOR__ &gt; 2)
<span class="lineNum">      77 </span><span class="lineCov">           4168 :     __c_locale __old = __gnu_cxx::__uselocale(__cloc);</span>
<span class="lineNum">      78 </span>                : #else
<span class="lineNum">      79 </span>                :     char* __old = std::setlocale(LC_NUMERIC, NULL);
<span class="lineNum">      80 </span>                :     char* __sav = NULL;
<span class="lineNum">      81 </span>                :     if (__builtin_strcmp(__old, &quot;C&quot;))
<span class="lineNum">      82 </span>                :       {
<span class="lineNum">      83 </span>                :         const size_t __len = __builtin_strlen(__old) + 1;
<span class="lineNum">      84 </span>                :         __sav = new char[__len];
<span class="lineNum">      85 </span>                :         __builtin_memcpy(__sav, __old, __len);
<span class="lineNum">      86 </span>                :         std::setlocale(LC_NUMERIC, &quot;C&quot;);
<span class="lineNum">      87 </span>                :       }
<span class="lineNum">      88 </span>                : #endif
<span class="lineNum">      89 </span>                : 
<span class="lineNum">      90 </span>                :     __builtin_va_list __args;
<span class="lineNum">      91 </span><span class="lineCov">           4168 :     __builtin_va_start(__args, __fmt);</span>
<span class="lineNum">      92 </span>                : 
<span class="lineNum">      93 </span>                : #ifdef _GLIBCXX_USE_C99
<span class="lineNum">      94 </span><span class="lineCov">           4168 :     const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);</span>
<span class="lineNum">      95 </span>                : #else
<span class="lineNum">      96 </span>                :     const int __ret = __builtin_vsprintf(__out, __fmt, __args);
<span class="lineNum">      97 </span>                : #endif
<span class="lineNum">      98 </span>                : 
<span class="lineNum">      99 </span><span class="lineCov">           4168 :     __builtin_va_end(__args);</span>
<span class="lineNum">     100 </span>                : 
<span class="lineNum">     101 </span>                : #if __GLIBC__ &gt; 2 || (__GLIBC__ == 2 &amp;&amp; __GLIBC_MINOR__ &gt; 2)
<span class="lineNum">     102 </span><span class="lineCov">           4168 :     __gnu_cxx::__uselocale(__old);</span>
<span class="lineNum">     103 </span>                : #else
<span class="lineNum">     104 </span>                :     if (__sav)
<span class="lineNum">     105 </span>                :       {
<span class="lineNum">     106 </span>                :         std::setlocale(LC_NUMERIC, __sav);
<span class="lineNum">     107 </span>                :         delete [] __sav;
<span class="lineNum">     108 </span>                :       }
<span class="lineNum">     109 </span>                : #endif
<span class="lineNum">     110 </span><span class="lineCov">           4168 :     return __ret;</span>
<span class="lineNum">     111 </span>                :   }
<span class="lineNum">     112 </span>                : 
<span class="lineNum">     113 </span>                : _GLIBCXX_END_NAMESPACE
<span class="lineNum">     114 </span>                : 
<span class="lineNum">     115 </span>                : #endif
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
